<html>
    <title>Welcome to Evolable Asia</title>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="<?php echo base_url()?>templates/images/icons/icon_manage.png" rel="shortcut icon" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/css/styles.css" />
    <script language="JavaScript" src="<?php echo base_url()?>templates/js/myjs.js" type="text/javascript">
    </script>
     <style type="text/css" title="currentStyle">
			@import "<?php echo base_url()?>templates/css/demo_page.css";
			@import "<?php echo base_url()?>templates/css/demo_table.css";
			@import "<?php echo base_url()?>templates/css/jsDatePick_ltr.css";
			@import "<?php echo base_url()?>templates/css/demo_table_jui.css";
			@import "<?php echo base_url()?>templates/css/demo_validation.css";
			@import "<?php echo base_url()?>templates/css/jquery-ui-1.8.22.custom.css";
		</style>

		<script type="text/javascript" language="javascript" src="<?php echo base_url()?>templates/js/jquery.js"></script>
		<script type="text/javascript" language="javascript" src="<?php echo base_url()?>templates/js/jquery.dataTables.js"></script>
		<script type="text/javascript" language="javascript" src="<?php echo base_url()?>templates/js/jsDatePick.min.1.3.js"></script>
		

		<script src="<?php echo base_url()?>templates/js/jquery-1.4.4.min.js" type="text/javascript"></script>
        <script src="<?php echo base_url()?>templates/js/jquery.dataTables.min.js" type="text/javascript"></script>
        <script src="<?php echo base_url()?>templates/js/jquery.jeditable.js" type="text/javascript"></script>
        <script src="<?php echo base_url()?>templates/js/jquery.validate.js" type="text/javascript"></script>
        <script src="<?php echo base_url()?>templates/js/jquery.dataTables.editable.js" type="text/javascript"></script>
        <script src="<?php echo base_url()?>templates/js/jquery-ui-1.8.22.custom.min.js" type="text/javascript"></script>
        <script src="<?php echo base_url()?>templates/js/dataTables.fnReloadAjax.js" type="text/javascript"></script>
		
		<!--For menu-->
		<link href="<?php echo base_url()?>templates/css/dcmegamenu.css" rel="stylesheet" type="text/css" />
		<link href="<?php echo base_url()?>templates/css/skins/white.css" rel="stylesheet" type="text/css" />
		<script type='text/javascript' src='<?php echo base_url()?>templates/js/jquery.hoverIntent.minified.js'></script>
		<script type='text/javascript' src='<?php echo base_url()?>templates/js/jquery.dcmegamenu.1.3.3.js'></script>
		<script type="text/javascript">
		$(document).ready(function($){
			//alert("ok");
			$('#mainmenu').dcMegaMenu({
				rowItems: '3',
				speed: 'fast'
			});
		});
		</script>
    </head>
    <body onload="autocalculate()">
        
        <div id="container">
            <div id="header">
                <h1>
                    <?php 
                    $titleHome = '<img src ="'.base_url().'templates/images/_logo.png" id="logo_header"/>';
                    $home = anchor("login/home",$titleHome);
                    echo $home;
                    ?>
                    <!--<img src="<?php echo base_url()?>templates/images/icons/logo-header.png" id="logo_header">-->
                </h1>
                <img src="<?php echo base_url()?>templates/images/banner_right.jpg" id="banner">
            </div>
            <div id="menu" class="white">
                <ul id="mainmenu" class="mega-menu">
			
						<li>
                                <a href='<?php echo base_url()?>staff'>Home</a>
                          	 <ul>								
								<li><a href='<?php echo base_url()?>login/loadFormChangePassword'>Change Password</a></li>
								<li><a href='<?php echo base_url()?>role'>Role</a></li>	
								<li><a href='<?php echo base_url()?>login/logout'>Logout</a></li>
							</ul>	
                                                </li>
						<li>
							<a href='<?php echo base_url()?>lab'>Lab</a>
							<ul>								
								<li><a href='<?php echo base_url()?>project'>Project</a></li>
								<li><a href='<?php echo base_url()?>labStaff'>LabStaff</a></li>
							</ul>							
						</li>	
						<li>
							<a href='<?php echo base_url()?>payRoll'>Salary</a>
							<ul>
								<li><a href='<?php echo base_url()?>allSalary'>AllSalary</a></li>
								<li><a href='<?php echo base_url()?>monthlyAllow'>MonthlyAllow</a></li>
								<li><a href='<?php echo base_url()?>MAS'>MonthlyAllowStaff</a></li>
								<li><a href='<?php echo base_url()?>tax'>Tax</a></li>
								<li><a href='<?php echo base_url()?>PIT'>PIT</a></li>
								<li><a href='<?php echo base_url()?>SHU'>SHU</a></li>
								<li><a href='<?php echo base_url()?>miniSalary'>MiniSalary</a></li>
								<li><a href='<?php echo base_url()?>overTime'>OverTime</a></li>
							</ul>							
						</li>
						<li>
							<a href='<?php echo base_url()?>customerReport'>CustomerReport</a>
							<ul>
								<li><a href='<?php echo base_url()?>customerReport/allLab'>AllLab</a></li>
							</ul>
							
						</li>												
						<li>
							<a href='<?php echo base_url()?>department'>Department</a>
							<ul>
								<li><a href='<?php echo base_url()?>section'>Section</a></li>
							</ul>							
						</li>
							
						<li>
							<a href='<?php echo base_url()?>contract'>Contract</a>
							<ul>
								<li><a href='<?php echo base_url()?>workLevel'>WorkLevel</a></li>
								<li><a href='<?php echo base_url()?>SIHI'>SIHI</a></li>
								<li><a href='<?php echo base_url()?>annex'>Annex</a></li>
								<li><a href='<?php echo base_url()?>contractType'>ContractType</a></li>								
							</ul>
						</li>						
						
						<li>
							<a href='<?php echo base_url()?>time'>MonthTime</a>
							<ul>
								<li><a href='<?php echo base_url()?>workDay'>WorkDay</a></li>
								<li><a href='<?php echo base_url()?>AllWorkDay'>AllWorkDay</a></li>
								<li><a href='<?php echo base_url()?>time/AllMonthTime'>AllMonthTime</a></li>								
							</ul>							
						</li>
						
						<li>
							<a href='<?php echo base_url()?>training'>Training</a>
							<ul>
								<li><a href='<?php echo base_url()?>training/assign/0'>Staff Training</a></li>
								<li><a href='<?php echo base_url()?>training/individual'>Individual Training Record</a></li>
							</ul>
						</li>						
						
						<li>
							<a href='<?php echo base_url()?>staff/loadFormInsertStaffBegin'>Manage Staff</a>
                            <ul>
								<li><a href='<?php echo base_url()?>staff/listStaffForeigners'>Foreigners</a></li>
								
							</ul>
                        </li>
						<li>
							<a href='<?php echo base_url()?>CV/loadFormInsertCV'>CV Database</a>
                            <ul>
                                <li><a href='<?php echo base_url()?>interview/loadListCV'>Manage Interview</a></li>                                                        
                            </ul>
                        </li>         
                                                                                               
						
			</ul>					
			
		
            </div>
            <div id="hello">
            	<?php  $staff_id=$this->session->userdata('staff_id');	?>
                Welcome:<strong align="right"><?=$this->session->userdata('email') ?></strong>
            </div>
        
        <?php 
            /*$titleRegisterOvertime = '<img src ="'.base_url().'application/templates/images/register1.jpeg" title="Click here to register now" width=80 height=50/>';
            $register_overtime = anchor("user/loadRegisterTimeForm",$titleRegisterOvertime);
            echo "<td class=\"row1\" align=\"center\">$register_overtime</td></tr>";*/
            ?>
        
        <div id="content">
            <div id="left_content">
                <form action="<?php echo base_url()?>search/index" method="POST">
                <table id="search">
                    <tr>
                        <td colspan="2" align="center" class="row">Search by Lab</td>
                    </tr>
                    <!--
                    <tr>
                                        <td align="center" class="row_space3" colspan="2"></td>
                                        </tr>-->
                    
                    <tr height="40px"> 
                        <td class="row11" style="padding-left:10px;">Lab</td>
                        <td class="row21">
                            <select name="txtLabID" id="searchbox1" <!--onChange="showUser(this.value)"-->>
                                <option value="2000">--Select all--</option>
                                   <?php
                                    $query=$this->db->query("select distinct Lab_ID from Lab");
                                    foreach($query->result() as $row)
                                    {
                                        //$Lab_ID=$this->security->sanitize_filename($this->input->post('txtLab'));
                                        $Lab_ID=$this->session->userdata('Lab_ID');
                                    ?>
                                        <option value="<?=$row->Lab_ID?>" <?php if($row->Lab_ID==$Lab_ID) echo "selected";?>>
                                            <?php 
                                            $query1=$this->db->query("select * from Lab where Lab_ID='$row->Lab_ID'");
                                            foreach($query1->result() as $row1)
                                             echo $row1->LabName;
                                             ?>
                                       </option>
                                    <?php }
                                    ?>
                            </select>
                        </td>
                    <!--
                    </tr>
                                        <td align="center" class="row_space1" colspan="2"></td>
                                        </tr>-->
                    
                    <tr height="40px">
                        <td align="center" colspan="2"><input type="submit" name="search" id="submit" value="Search"></td>
                    </tr>
                    <!--<div id="txtHint"></div>-->
                </table>
                        
                    
                </form>
                <table id="mailbox">
                	<tr height="15px">
                        <td align="center" class="row">Mail box</td>
                    </tr>
                    <tr>
                        <td id="mailtd">
                            <a class="mail" href='<?php echo base_url()?>contact/index'>Compose Mail</a>
                            <br />
                            <a class="mail" href='<?php echo base_url()?>contact/listInbox'>Inbox</a>
                            <br />
                            <a class="mail" href='<?php echo base_url()?>contact/listSendMail'>Sent Mail</a>
                        </td>
                    </tr>
                    <!--
                    <tr>
                                            <td>
                                                <a class="mail" href='<?php echo base_url()?>contact/listInbox'>Inbox</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a class="mail" href='<?php echo base_url()?>contact/listSendMail'>Sent Mail</a>
                                            </td>
                                        </tr>-->
                    
                </table>
            </div>
            <div id="right_content">
                <div id="searchkey">
                    <form action="<?php echo base_url()?>search/searchbykeyword" method="POST" name="searchByKey" onsubmit="return checkSearchByKey();">
                    <table id="searchtag">
                        <tr>
                            <!--<td align="right" id="please"><strong>Please input keyword</strong></td>-->
                            <td align="right"><input type="text" name="keyword" id="searchbox" value="<?php $keyword=$this->session->userdata('keyword'); echo $keyword;?>"></td>
                            <td align="right"><input type="submit" name="search" id="submit" value="Search"></td>
                            
                        </tr>
                    </table>
                    </form>
                </div>
                